#预测儿子的身高
# father_height=eval(input("爸爸的身高："))
# mother_height=eval(input("妈妈的身高"))
# son_height=(father_height+mother_height)*0.54
# print(round(son_height,2))

#判断奇偶数
# num=eval(input("输入一个整数："))
# if num%2: # if True True为1
#     print(num,"是奇数")
# else:
#     print(num,"是偶数")

# str=input("输入字符串:")
# if not str:
#     print("输 入为空")
# else:
#     print("输入不为空")

# print("输入为空" if not str else "输入不为空")

# score=eval(input("输入成绩："))
# if score>=85:print("优")
# elif score <85 and score >=60:print("良")
# else:print("不及格")

# for i in 'hello':#与java不同的是，i在单次循环完成后会自动+1
#     print(i)
# for i in range(0,1000):#求水仙花数
#     sd=i%10
#     tens=i//10%10
#     hund=i//100
#     if i==sd**3+tens**3+hund**3:
#         print(i)

#输出菱形，先打印正三角形，后打印倒三角形
row=eval(input("输入菱形的行数："))
if row%2==0:
    print('偶数行无法打印菱形，请输入奇数')
else:
    top=row//2+1
    for i in range(1,top+1):
        for k in range(1,top+1-i):
            print(' ', end='')
        for j in range(1,2*i):
            print('*',end='')
        print()
    for m in range(1, top):
        for n in range(1, m+1):
            print(' ', end='')
        for h in range(1,top*2-2*m):
            print('*', end='')
        print()

#输出空心菱形
#先打印正三角形，后打印倒三角形
ow=eval(input("输入空心菱形的行数："))
if row%2==0:
    print('偶数行无法打印菱形，请输入奇数')
else:
    top=row//2+1
    for i in range(1,top+1):
        for k in range(1,top+1-i):
            print(' ', end='')
        for j in range(1,2*i):
            if j > 1 and j < 2 * i - 1:
                print(' ', end='')
            else:
                print('*', end='')
        print()
    for m in range(1, top):
        for n in range(1, m+1):
            print(' ', end='')
        for h in range(1,top*2-2*m):
            if h > 1 and h < top*2 - 2 * m - 1:
                print(' ', end='')
            else:
                print('*', end='')
        print()


while True:
    print()
else:
    pass